<template>
	<view  :data-theme='theme()' :class="theme() || ''">
		<!-- #ifdef APP-PLUS -->
    <header-bar></header-bar>
		<!-- #endif -->
    <image class="bg_topimg" src="../../static/background_top.png" mode=""></image>
    <view class="shop_head_info">
      <view class="shop_head_info_top">
        <view class="shop_list_body_item_shop_logo">
          <image :src="businessInfo.posterImg" mode=""></image>
          <view class="collect_btn" style="margin-top: 20rpx;" @click="guanzhu()">查看图册</view>
        </view>
        <view class="shop_list_body_item_shop_info">
          <view class="h1 white fb title">
            {{ businessInfo.businessName || '' }}
          </view>
          <view class="f26 white" style="overflow: hidden;margin-top: 10rpx;">{{ businessInfo.businessDesc }}</view>
        </view>
      </view>
      <view class="collected-view" style="margin: 20rpx 0 20rpx 0;">
        <view class="collected-left">
          <view class="f22 white ml30 collect" style="text-align: center;">
            <view class="collected-num">{{ businessInfo.supplierCount || '0' }}</view>
            <view>门店数</view>
          </view>
          <view class="f22 white ml30 collect" style="text-align: center;">
            <view class="collected-num">{{ businessInfo.productCount || '0' }}</view>
            <view>在售</view>
          </view>
          <view class="f22 white ml30 collect" style="text-align: center;">
            <view class="collected-num">{{ businessInfo.collectionCount || '0' }}</view>
            <view>关注</view>
          </view>
          <view class="f22 white ml30 collect" style="text-align: center;">
            <view class="collected-num">{{ businessInfo.likeCount || '0' }}</view>
            <view>点赞</view>
          </view>
        </view>
		<view class="collected-right">
		  <image style="width: 55rpx;height: 55rpx;" src="/static/icon/icon-erweima.png" mode=""></image>
		  <view class="collect_btn" @click="toBusinessWxq()">加入群聊</view>
		  <view v-if="isfollow == 0" class="collect_btn" @click="guanzhu()">关注</view>
		  <view v-if="isfollow == 1" class="collected" @click="guanzhu()">已关注</view>
		</view>
      </view>

      <view class="">
        <image class="location-icon" src="/static/icon/address_icon.png" mode="aspectFit"></image>
        <text style="color: #ffffff; text-decoration:underline;">地址：{{ businessInfo.address }}</text>
      </view>
    </view>

    <view class="shopList-box" v-if="!isShowProductList">
      <view class="top-box">
        <view class="index-search-box index-search-box_re d-b-c" id="searchBox">
          <view class="index-search index-search_re t-c flex-1">
            <span class="icon iconfont icon-sousuo"></span>
            <input type="text" v-model="searchtxt" class="flex-1 ml10 f30 gray3"  placeholder-class="f24 gray6"
                   placeholder="搜索店铺" confirm-type="search" @confirm="search()" />
          </view>
        </view>
<!--        <view class="inner-tab">
          <view :class="type_active=='all'?'item active':'item'" @click="tabTypeFunc('all')">
            <view class="box">综合</view>
          </view>
          <view :class="type_active=='sales'?'item active':'item'" @click="tabTypeFunc('sales')">
            <view class="box">销量</view>
          </view>
          <view :class="type_active=='score'?'item active':'item'" @click="tabTypeFunc('score')">
            <view class="box">
              <text>关注</text>
            </view>
          </view>
        </view>-->
        <view class="inner-tab" style="height: 100rpx; line-height: 100rpx; padding: 0 50rpx 10rpx 10rpx; z-index: 300; background: #ffffff;">
          <navBar style="width: 100%;" :color='openCategory.color' @currentIndex="setTagIndex" :navList="tagList"></navBar>
        </view>
      </view>
      <view class="prodcut-list-wrap">
        <scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'" lower-threshold="50"
                     :refresher-triggered="triggered" @scrolltolower="scrolltolowerFunc" refresher-enabled="true" @refresherrefresh="onRefresh"
                     @refresherrestore="onRestore">
          <view class="shop_list_body">
            <view class="shop_list_body_item" v-for="(item,index) in shopData" :key="index">
              <view class="shop_list_body_item_shop" @click="goto_shop(item.shopSupplierId)">
                <view class="shop_list_body_item_shop_logo">
                  <image :src="item.logoFilePath"></image>
                </view>
                <view class="shop_list_body_item_shop_info">
                  <view class="h1 title">{{item.name}}</view>
                  <view class="h3 brand">主营品牌：{{item.categoryName}}</view>
                  <view class="h3 sales">销量{{item.productSales}}件<text class="ml10 mr10">|</text>{{item.favCount}}人关注</view>
                </view>
              </view>

              <scroll-view class="product-list" scroll-x style="margin: 20rpx 0">
              <view v-if="shopData[index].productList.length>0" :class="shopData[index].productList.length<3?'shop_list_body_item_product2':'shop_list_body_item_product'">
                <view class="shop_list_body_item_product_item" v-for="(item2,index2) in shopData[index].productList" :key="index2"
                      @click="goto_product(item2.productId)">
                  <view>
                    <image :src="item2.productImage"></image>
                  </view>
                  <view class="shop_list_body_item_product_item_price">
                    <view class="f22 red">¥
                      <text class="f32">
                        {{item2.productPrice}}
                      </text></view>
                  </view>
                </view>
              </view>
              </scroll-view>
            </view>
          </view>
          <!-- 没有记录 -->
          <view class="d-c-c p30" v-if="shopData.length==0 && !loading">
            <text class="iconfont icon-wushuju"></text>
            <text class="cont">亲，暂无相关记录哦</text>
          </view>
          <uni-load-more v-else :loadingType="loadingType"></uni-load-more>
        </scroll-view>
      </view>
    </view>

    <!-- 商品部分 -->
    <view v-if="isShowProductList" class="productList-box">
      <view class="shop_head">
        <!-- 商品导航栏 -->
        <view class="inner-tab" v-if="product.nav_type == 0">
          <view :class="product.type_active == 'all' ? 'item active' : 'item'" @click="tabProductTypeFunc('all')"><view class="box">综合</view></view>
          <view :class="product.type_active == 'sales' ? 'item active' : 'item'" @click="tabProductTypeFunc('sales')"><view class="box">销量</view></view>
          <view :class="product.type_active == 'price' ? 'item active' : 'item'" @click="tabProductTypeFunc('price')">
            <view class="box"><text>价格</text></view>
          </view>
          <view class="item" @click="select_type()">
            <view class="box"><image style="width: 36rpx; height: 36rpx" :src="product.isLieBiao == true ? '/static/shop/liebiao.png' : '/static/shop/tubiao.png'"></image></view>
          </view>
        </view>
        <!-- 商品导航栏 -->
      </view>
      <scroll-view
          v-if="product.nav_type != 2"
          scroll-y="true"
          :style="'height:' + scrollviewHigh + 'rpx;'"
          class="scroll-Y pr bg-f2"
          lower-threshold="50"
          @scrolltolower="scrolltolowerFunc"
      >
        <view class="shop">
          <view class="shop_body" v-if="product.isLieBiao == true && product.nav_type == 0">
            <view
                class="shop_body_l_item"
                v-for="(item, index) in product.list"
                :key="index"
                @click="goto_product(item.productId)"
            >
              <view><image :src="item.productImage" mode=""></image></view>
              <view class="shop_body_l_item_info">
                <view class="shop_body_l_item_info_title gray3 f32">{{ item.productName }}</view>
                <view class="d-b-c pb10">
                  <view class="shop_body_l_item_info_price">
                    <view class="f24 shop_red">
                      ¥
                      <text class="f32 fb">{{ item.productPrice }}</text>
                    </view>
                    <!-- <view class="h4 huaxianjia">¥<text class="h3">{{item.line_price}}</text></view> -->
                  </view>
                  <view class="shop_body_l_item_info_others f22">
                    <view class="shop_body_l_item_info_others_sales">累计成交：{{ item.productSales }}笔</view>
                  </view>
                </view>
              </view>
            </view>
          </view>
          <view class="shop_body2" v-if="product.isLieBiao == false && product.isLieBiao == 0">
            <view class="shop_body_t_item" v-for="(item, index) in product.list" :key="index" @click="goto_product(item.productId)">
              <image :src="item.productImage" mode=""></image>
              <view class="shop_body_t_item_info">
                <view class="shop_body_t_item_info_title h1">{{ item.productName }}</view>
                <view class="shop_body_t_item_info_price">
                  <view class="f24 redF6">
                    ¥
                    <text class="h1">{{ item.productPrice }}</text>
                  </view>
                  <view class="f24 huaxianjia">
                    ¥
                    <text class="h3">{{ item.linePrice }}</text>
                  </view>
                </view>
                <view class="shop_body_t_item_info_others h3">
                  <view class="shop_body_t_item_info_others_sales">累计成交：{{ item.productSales }}笔</view>
                </view>
              </view>
            </view>
          </view>
          <!-- 直播 -->
          <view v-if="nav_type == 1">
            <view class="live_list" v-if="liveList.length > 0">
              <view v-for="(liveitem, liveindex) in liveList" :key="liveindex" class="live_item" @click="toRoom(liveitem)">
                <view v-if="liveitem.record_url != ''" class="record">可回放</view>
                <view v-if="liveitem.record_url == ''" class="record_off">回放生成中</view>
                <view class="live_img"><image :src="liveitem.share.file_path" mode=""></image></view>
              </view>
            </view>
            <view class="ww100" v-else><view class="f30 gray6 tc mt50 pt20">暂无直播间</view></view>
          </view>
        </view>
        <!-- 商品列表 -->
        <view v-if="nav_type == 0">
          <view class="d-c-c p30" v-if="product.list.length == 0 && !loading">
            <text class="iconfont icon-wushuju"></text>
            <text class="cont">亲，暂无相关记录哦</text>
          </view>
          <uni-load-more v-else :loadingType="loadingType"></uni-load-more>
          <view class="" style="width: 100%;height: 100rpx;"></view>
        </view>
      </scroll-view>
    </view>


		<tabBar></tabBar>
		<view class="d-a-c nav_bottom">
			<view class="bottomTab" v-if="!isShowProductList" @click="goto_home()">
				<view class="icon iconfont icon-Homehomepagemenu" ></view>
				<view>广场</view>
			</view>
			<view class="bottomTab" v-if="isShowProductList" @click="showBusinessList()">
				<view class="icon iconfont icon-Homehomepagemenu"></view>
				<view>店铺</view>
			</view>
			<view class="bottomTab" @click="showProductList()">
				<view :class="isShowProductList ? 'active' : ''" class="icon iconfont icon-quan" ></view>
				<view>优惠</view>
			</view>
			<view class="bottomTab"  @click="goto_mycenter()">
				<view class="icon iconfont icon-kefu2"></view>
				<view>我的</view>
			</view>
		</view>
	</view>
</template>

<script>
	import uniLoadMore from "@/components/uni-load-more.vue";
	export default {
		components: {
			uniLoadMore
		},
		data() {
			return {
        businessInfo:{}, // 商圈
        isfollow:0,
				triggered: true,
				/*手机高度*/
				phoneHeight: 0,
				/*可滚动视图区域高度*/
				scrollviewHigh: 0,
				/*状态选中*/
				state_active: -1,
				no_more: false,
				loading: true,
				/*最后一页码数*/
				last_page: 0,
				/*当前页面*/
				page: 1,
				/*每页条数*/
				list_rows: 10,
				/*顶部刷新*/
				topRefresh: false,
				/*类别选中*/
				type_active: 'all',
				/*价格选中*/
				price_top: false,
				/*店铺列表*/
				shopData: [],
				/*当前页面*/
				searchtxt: '',
				stateTab: false,
        shopBusinessId:null,

        isShowProductList:false,
        product:{
          list:[],
          no_more: false,
          loading: true,
          /*最后一页码数*/
          last_page: 0,
          /*当前页面*/
          page: 1,
          /*每页条数*/
          list_rows: 10,
          type_active:1,
          nav_type:0,
          isLieBiao:false,
        },

        openCategory: {
          color: "#303133",
          open: 0
        },
        tagIndex: null,
        tagList: [
          {
            tagId: null,
            name: "所有",
          }
        ],
        businessTagId:null,
			};
		},
		computed: {
			/*加载中状态*/
			loadingType() {
				if (this.loading) {
					return 1;
				} else {
					if (this.shopData.length != 0 && this.no_more) {
						return 2;
					} else {
						return 0;
					}
				}
			}
		},
		onShow() {
			this.getTabBarLinks();
		},
    onLoad: function(options){
      this.shopBusinessId = options.shopBusinessId;
    },
		mounted() {
			this.init();
			this._freshing = false;
			this.restoreData();
			/*获取订单列表*/
			this.getData();
			this.getBusinessTagList();
			this.getBusiness();
      if (this.isShowProductList){
        this.getProductList();
      }
		},
    onReachBottom(){
      let self = this;
      //产品列表
      if (this.isShowProductList){
        if (this.product.no_more || this.product.page >= this.product.last_page){
          return;
        }
        this.product.no_more = true;
        this.product.page++;
        this.getProductList();
      }else {
        //商家列表
        if (this.no_more || this.page>= this.last_page){
          return;
        }
        this.no_more = true;
        this.page++;
        this.getData();

      }
    },


    onShareAppMessage:function(){
      let sid = '';
      /* if(this.userInfo.userUuid){
         sid = this.userInfo.userUuid;
       }*/
      console.log("分享用户ID: "+sid);
      return {
        title: '同城好街，逛街不走冤枉路，与你分享!',
        path: '/pages/index/index?sid='+sid,
        success(res) {
          uni.showToast({
            title: '分享成功',
          })
        },
        fail(res) {
          uni.showToast({
            title: '分享失败',
            icon: 'none',
          })
        },
      }
    },

    onShareTimeline:function(){
      let sid = '';
      return {
        title: '同城好街，逛街不走冤枉路，与你分享!',
        path: '/pages/index/index?sid=' + sid,
        success(res) {
          uni.showToast({
            title: '分享成功',
          })
        },
        fail(res) {
          uni.showToast({
            title: '分享失败',
            icon: 'none',
          })
        },
      }
    },

		methods: {
			/*初始化*/
			init() {
				let self = this;
				uni.getSystemInfo({
					success(res) {
						self.phoneHeight = res.windowHeight;
						// 计算组件的高度
						let view = uni.createSelectorQuery().in(self).select('.top-box');
						view.boundingClientRect(data => {
							console.log(data)
							let h = self.phoneHeight - data.height;
							self.scrollviewHigh = h;
						}).exec();
					}
				});

			},
			/*还原初始化*/
			restoreData() {
				this.shopData = [];
				this.page = 1;
				this.no_more = false;
				this.loading = true;
				this.category_id = 0;
				this.sortType = '';
				this.sortPrice = 0;
        this.product = {
          list:[],
              no_more: false,
              loading: true,
              /*最后一页码数*/
              last_page: 0,
              /*当前页面*/
              page: 1,
              /*每页条数*/
              list_rows: 10,
              type_active:1,
              nav_type:0,
              isLieBiao:false,
        };
			},
			/*类别切换*/
			tabTypeFunc(e) {
				let self = this;
				self.shopData = [];
				self.page = 1;
				self.no_more = false;
				self.loading = true;
				self.type_active = e;
				self.getData();
			},

			/*获取数据*/
			getData() {
				let self = this;
				let page = self.page;
				let list_rows = self.list_rows;
				self.loading = true;
				self._postBody('supplier/index/list', {
					pageIndex: page || 1,
					pageSize: list_rows,
					sortType: self.type_active,
					name: self.searchtxt,
          shopBusinessId: self.shopBusinessId,
          businessTagId:self.businessTagId,
				}, (res) => {
					self.loading = false;
					self.last_page = res.data.lastPage;
					self.shopData = self.shopData.concat(res.data.records);
					if (res.data.lastPage <= 1) {
						self.no_more = true;
					} else {
						self.no_more = false;
					}
				})
			},
			onRefresh() {
				if (this._freshing) return;
				this._freshing = true;
				this.restoreData();
				this.getData();
				setTimeout(() => {
					this.triggered = false;
					this._freshing = false;
				}, 2000)
			},
			onRestore() {
				this.triggered = 'restore'; // 需要重置
			},
			/*搜索*/
			search() {
				let self = this;
				self.restoreData();
				self.getData();
			},
			/*可滚动视图区域到底触发*/
			scrolltolowerFunc() {
				let self = this;
				if (self.no_more) {
					return;
				}
				self.page++;
				if (self.page <= self.last_page) {
					self.getData();
				} else {
					self.no_more = true;
				}
			},
      getBusiness() {
        let self= this;
        self._postBody('business/business/details', {
          businessId: self.shopBusinessId,
        }, (res) => {
          console.log("getBusiness", res)
          self.businessInfo = res.data;
          self.isfollow = self.businessInfo.isFollow;
        })
      },
      getBusinessTagList() {
        let self= this;
        self._postBody('business/businessTag/list', {
          businessId: self.shopBusinessId,
        }, (res) => {
          console.log("getBusinessTagList", res)
          if (res.data.records && res.data.records.length>0){
            self.tagList = self.tagList.concat(res.data.records);
          }
        })
      },
      setTagIndex(e){
        this.businessTagId = this.tagList[e].tagId;
        this.page = 1;
        this.shopData = [];
        this.getData();
      },

			//跳转店铺首页
			goto_shop(shopSupplierId) {
        uni.navigateTo({
          url: '/pages/shop/shop?shopSupplierId=' + shopSupplierId,
        });
			},
			//跳转商品页面
			goto_product(productId) {
        uni.navigateTo({
          url: '/pages/product/detail/detail?productId=' + productId,
        });
			},

			//跳转首页
			goto_home() {
        uni.switchTab({
          url: '/pages/index/index',
        });
			},

      goto_mycenter(){
        uni.switchTab({
          url: '/pages/user/index/index',
        });
      },

      // 显示商品列表
      showBusinessList(){
        this.isShowProductList = false;
      },

      // 显示商品列表
      showProductList(){
        this.isShowProductList = true;
        this.product = {
          list:[],
          no_more: false,
          loading: true,
          /*最后一页码数*/
          last_page: 0,
          /*当前页面*/
          page: 1,
          /*每页条数*/
          list_rows: 10,
          type_active:1,
          nav_type:0,
          isLieBiao:false,
        };
        this.getProductList();
      },
      getProductList(){
        let self = this;
        let page = self.product.page;
        let list_rows = self.product.list_rows;
        self.product.loading = true;
        self._postBody('product/product/lists', {
          pageIndex: page || 1,
          pageSize: list_rows,
          shopBusinessId: self.shopBusinessId,
        }, (res) => {
          self.product.loading = false;
          self.product.last_page = res.data.lastPage;
          self.product.list = self.product.list.concat(res.data.records);
          if (res.data.lastPage <= 1) {
            self.product.no_more = true;
          } else {
            self.product.no_more = false;
          }
        })
      },
      select_type(){
        let self = this;
        self.product.isLieBiao = !self.product.isLieBiao;
      },
      tabProductTypeFunc(e){
        let self = this;
        self.product.list = [];
        self.product.page = 1;
        self.product.no_more = false;
        self.product.loading = true;
        self.product.type_active = e;
        this.getProductList();
      },
      //关注商圈/取消关注
      guanzhu() {
        let self = this;
        self._postBody(
            'user/favorite/add',
            {
              pid: self.shopBusinessId,
              type: 30
            },
            res => {
              if (self.isfollow == 0) {
                self.isfollow = 1;
              } else if (self.isfollow == 1) {
                self.isfollow = 0;
              }
            }
        );
      },

      toBusinessWxq(){
        
      },


		}
	};
</script>

<style lang="scss" scoped>
	page {
		background: #f2f2f2;
	}

  .location-view{
    display: inline-flex;
  }

  .location-icon, .like-icon {
    width: 34rpx;
    height: 36rpx;
    margin-right: 6rpx;
    display: inline-flex;
  }

  .sticky-top {
    position: sticky;
    width: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
  }

  .head_top {
    position: relative;
    height: 30px;
    line-height: 30px;
    color: #ffffff;
    font-size: 30rpx;
  }

  .bg_topimg {
    position: absolute;
    top: 0;
    width: 100%;
    height: 470rpx;
  }

  .prodcut-list-wrap {
    padding-bottom: 100rpx;
  }

  .shop_head_info {
    width: 100%;
    margin: 0 auto;
    position: relative;
    padding: 40rpx 20rpx 20rpx 20rpx;
    box-sizing: border-box;
    // background-color: white;
  }

  .shop_head_info_top {
    width: 100%;
    height: 224rpx;
    display: flex;
    justify-content: space-between;
    margin-bottom: 8rpx;
  }

  .shop_list_body_item_shop_logo {
    width: 120rpx;
    height: 120rpx;
  }

  .shop_list_body_item_shop_logo image {
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 15rpx;
  }

  .shop_list_body_item_shop_info {
    // padding: 10rpx;
    flex: 1;
    margin-left: 32rpx;
    box-sizing: border-box;
    // margin-left: -10%;
    padding-top: 0;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
  }

  .shop_list_body_item_shop_others {
    padding: 10rpx;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    text-align: right;
  }

  .collected-view{
    width: 100%;
    display: inline-flex;
    justify-content: space-between;
    justify-items: center;
    align-items: center;
  }

  .collected-left{
    display: inline-flex;
  }

  .collected-right{
    display: inline-flex;
  }

  .collected-num{
    font-size: 26rpx;
    margin-bottom: 8rpx;
  }

  .collected {
    width: 110rpx;
    height: 50rpx;
    line-height: 50rpx;
    text-align: center;
    border: 1rpx solid #ffffff;
    color: #ffffff;
    background: none;
    border-radius: 30rpx;
    font-size: 22rpx;
    margin-left: 10rpx;
  }

  .collect_btn {
    width: 110rpx;
    height: 50rpx;
    line-height: 50rpx;
    text-align: center;
    border: 1rpx solid #f6220c;
    background: #f6220c;
    color: #ffffff;
    border-radius: 30rpx;
    font-size: 22rpx;
    margin-left: 10rpx;
  }

  .brand {
    position: relative;
    color: #ffffff;
  }

  .sales {
    color: #ffffff;
  }

  .collect {
    color: #ffffff;
  }

  .shop_list_body_item_shop_others button {
    // width: 140rpx;
    height: 60rpx;
    line-height: 60rpx;
    font-size: 30rpx;
    color: #ffffff;
    border-radius: 30rpx;
    padding: 0 40rpx;
    background-color: #f6220c;
  }



// 原来的样式
	.foot_ {
		height: 98rpx;
		width: 100%;
	}

	.seacth {
		width: 750rpx;
		height: 110rpx;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.seacth input {
		width: 675rpx;
		height: 70rpx;
		border: 1px #D7D7D7 solid;
		border-radius: 20rpx;
		background-color: white;
		display: flex;
		align-items: center;
		padding-left: 20rpx;
		font-size: 24rpx !important;
	}

	.seacth input::before {
		margin-right: 10rpx;
		font-size: 24rpx !important;
	}

	.inner-tab {
		position: relative;
		height: 80rpx;
		display: flex;
		justify-content: space-around;
		align-items: center;
		background: #ffffff;
		z-index: 9;
	}

	.inner-tab .item {
		flex: 1;
		font-size: 30rpx;
		height: 100%;
		line-height: 80rpx;
		position: relative;
		color: #666666;
		font-size: 30rpx;
	}

	.inner-tab .item.active,
	.inner-tab .item .arrow.active .iconfont {
		color: #333333;
	}

	.inner-tab .item.active::after {
		content: '';
		width: 72rpx;
		height: 4rpx;
		@include background_color('background_color');
		border-radius: 2rpx;
		position: absolute;
		bottom: 14rpx;
		left: 0;
		right: 0;
		margin: auto;
	}

	.inner-tab .item .box {
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: row;
	}

	.inner-tab .item .arrows {
		margin-left: 10rpx;
		line-height: 0;
	}

	.inner-tab .item .iconfont {
		line-height: 24rpx;
		font-size: 24rpx;
	}

	.inner-tab .item .arrow,
	.inner-tab .item .svg-icon {
		width: 20rpx;
		height: 20rpx;
	}

	.prodcut-list-wrap {
		// padding-bottom: 98rpx;
	}

	.prodcut-list-wrap .list {
		background: #FFFFFF;
	}

	.prodcut-list-wrap .list .item {
		padding: 20rpx;
		display: flex;
		border-bottom: 16rpx solid #f6f6f6;
	}

	.prodcut-list-wrap .product-cover,
	.prodcut-list-wrap .product-cover image {
		width: 220rpx;
		height: 220rpx;
	}

	.prodcut-list-wrap .product-info {
		flex: 1;
		margin-left: 30rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-around;
	}

	.prodcut-list-wrap .product-title {
		display: -webkit-box;
		line-height: 40rpx;
		height: 80rpx;
		overflow: hidden;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		font-size: 32rpx;
	}

	.prodcut-list-wrap .already-sale {
		margin-top: 20rpx;
		color: #999;
		font-size: 24rpx;
	}

	.prodcut-list-wrap .already-sale>text {
		padding: 6rpx 10rpx;
		background-color: #f2f2f7;
	}

	.prodcut-list-wrap .price {
		@include font_color('price_color');
		font-size: 24rpx;
	}

	.prodcut-list-wrap .price .num {
		margin-left: 6rpx;
		padding: 0 4rpx;
		font-size: 40rpx;
	}

	// *********************
	// *********************
	.h1 {
		font-size: 32rpx;
	}

	.h2 {
		font-size: 28rpx;
	}

	.h3 {
		font-size: 24rpx;
	}

	.h4 {
		font-size: 20rpx;
	}

	.h5 {
		font-size: 16rpx;
	}

	.h6 {
		font-size: 12rpx;
	}

	.huaxianjia {
		text-decoration: line-through;
		color: #585858;
		margin-left: 4rpx;
	}

	.shop_list_body {
		width: 100%;
		// padding: 20rpx;
		box-sizing: border-box;
	}

	.shop_list_body_item {
		display: flex;
		width: 100%;
		max-height: 470rpx;
		margin-top: 30rpx;
		flex-direction: column;
		background-color: white;
		// border-radius: 20rpx;
		padding: 20rpx;
		// border-bottom: 2rpx #e8e8e8 solid;
		box-sizing: border-box;
	}

	.shop_list_body_item_shop {
		width: 100%;
		height: 150rpx;
		display: flex;
		justify-content: space-between;
		margin-bottom: 10rpx;
	}

	.shop_list_body_item_shop_logo {
		width: 150rpx;
		height: 150rpx;
	}

	.shop_list_body_item_shop_logo image {
		width: 100%;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.1);
		border-radius: 15rpx;
	}

	.shop_list_body_item_shop_info {
		padding: 10rpx;
		padding-left: 20rpx;
		box-sizing: border-box;
		padding-top: 0;
		display: flex;
    justify-content: flex-start;
		flex-direction: column;
		flex: 1;
	}

	.shop_list_body_item_shop_others {
		padding: 10rpx;
		box-sizing: border-box;
		display: flex;
		justify-content: flex-start;
		flex-direction: column;
		text-align: right;
		padding-top: 0;
		font-size: 26rpx;
		color: #333333;
	}

  .shop_list_body_item_product {
    width: 100%;
    height: 280rpx;
    display: flex;
    justify-content: space-around;
    align-items: center;
    // background-color: #f2f2f2;
    padding: 10rpx;
    box-sizing: border-box;
    // border-radius: 15rpx;
  }

  .shop_list_body_item_product2 {
    width: 100%;
    height: 280rpx;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    // background-color: #f2f2f2;
    padding: 10rpx;
    box-sizing: border-box;
    border-radius: 15rpx;
  }

	.shop_list_body_item_product2 .shop_list_body_item_product_item {
		margin: 0 10rpx;
	}

  .shop_list_body_item_product_item {
    width: 30%;
    background-color: white;
    margin-right: 10upx;
    // border-radius: 10rpx;
    /*overflow: hidden;*/
  }

	.shop_list_body_item_product_item image {
		width: 210rpx;
		height: 180rpx;
		border-radius: 12rpx;
		background-color: rgba(0, 0, 0, 0.1);
	}

	.shop_list_body_item_product_item view {
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 1;
		text-overflow: ellipsis;
		-webkit-box-orient: vertical;
		word-wrap: break-word;
		word-break: break-all;
		overflow: hidden;
	}

	.shop_list_body_item_product_item_price {
		padding: 15rpx;
		display: flex;
		align-items: baseline;
		justify-content: center;
		font-size: 32rpx;
	}

	.brand {
		position: relative;
		color: #585858;
	}

	.sales {
		color: #585858;
	}

	.collect {
		margin-bottom: 26rpx;
	}


	.nav_bottom {
		height: 100rpx;
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		text-align: center;
		background-color: #ffffff;
	}

  .nav_bottom .bottomTab{
    width: 150rpx;
  }

	.nav_bottom .icon {
		font-size: 50rpx;
	}

	.nav_bottom .active {
		color: #e2231a;
	}

	.nav_bottom .active .icon {
		color: #e2231a;
	}


  .shop_body {
    width: 100%;
    background-color: #ffffff;
    padding: 0rpx 20rpx;
    box-sizing: border-box;
  }

  .shop_body_l_item {
    // width: 90%;
    // height: 250rpx;
    margin: 0 auto;
    background-color: white;
    // border-radius: 15rpx;
    // margin-top: 20rpx;
    display: flex;
    padding: 40rpx 0;
    box-sizing: border-box;
    border-bottom: 1rpx solid #d9d9d9;
  }

  .shop_body_l_item image {
    width: 150rpx;
    height: 150rpx;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .shop_body_l_item_info {
    // width: 70%;
    // height: 100%;
    flex: 1;
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    padding-left: 20rpx;
    box-sizing: border-box;
  }

  .shop_body_l_item_info_title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-all;
    overflow: hidden;
  }

  .shop_body_l_item_info_price {
    display: flex;
    align-items: flex-end;
  }

  .shop_body_l_item_info_price view {
    margin-right: 15rpx;
  }

  .shop_body_l_item_info_others {
    // width: 100%;
    height: 30rpx;
    display: flex;
    justify-content: space-between;
  }

  .shop_body_l_item_info_others_activity {
    width: 150rpx;
    height: 30rpx;
    line-height: 30rpx;
    border: 1rpx #e22319 solid;
    border-radius: 30rpx;
    /* font-size: 16rpx; */
    color: #e22319;
    text-align: center;
    box-sizing: border-box;
  }

  .shop_body_l_item_info_others_sales {
    color: #333333;
  }

  .shop_body2 {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    background-color: #f2f2f2;
  }

  .shop_body_t_item {
    width: 45%;
    margin: 0 2.5%;
    margin-top: 20rpx;
    height: 520rpx;
    overflow: hidden;
    background-color: white;
  }

  .collect text {
    color: #ffffff;
  }

  .shop_body_t_item image {
    width: 100%;
    height: 337.5rpx;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .shop_body_t_item_info {
    height: 182.5rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10rpx;
    box-sizing: border-box;
  }

  .shop_body_t_item_info_title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    word-wrap: break-word;
    word-break: break-all;
    overflow: hidden;
  }

  .shop_body_t_item_info_price {
    display: flex;
    align-items: flex-end;
  }

  .shop_body_t_item_info_others {
    display: flex;
    justify-content: space-between;
  }

  .shop_body_t_item_info_others_activity {
  }

  .shop_body_t_item_info_others_sales {
    color: #585858;
  }
  /* ***************************** */
  .inner-tab {
    position: relative;
    height: 80rpx;
    display: flex;
    justify-content: space-around;
    align-items: center;
    // border-bottom: 1px solid #dddddd;
    background: #ffffff;
    z-index: 9;
  }

  .inner-tab .item {
    flex: 1;
    font-size: 30rpx;
    color: #999999;
    font-size: 32rpx;
    font-family: PingFang SC;
  }

  .inner-tab .item.active,
  .inner-tab .item .arrow.active .iconfont {
    color: $dominant-color;
  }

  .inner-tab .item.active {
    color: #333333;
    font-size: 32rpx;
    font-weight: bold;
    position: relative;
  }

  .inner-tab .item.active::after {
    content: '';
    position: absolute;
    bottom: -8rpx;
    width: 72rpx;
    height: 4rpx;
    background: #ee1414;
    border-radius: 2rpx;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  .inner-tab .item .box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    height: 100%;
  }

  .inner-tab .item .arrows {
    margin-left: 10rpx;
    line-height: 0;
  }

  .inner-tab .item .iconfont {
    line-height: 24rpx;
    font-size: 24rpx;
  }

  .inner-tab .item .arrow,
  .inner-tab .item .svg-icon {
    width: 20rpx;
    height: 20rpx;
  }

  .box image {
    width: 36rpx;
    height: 36rpx;
  }

  .nav_bottom {
    height: 100rpx;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    background-color: #ffffff;
  }

  .nav_bottom .icon {
    font-size: 50rpx;
  }

  .nav_bottom .active {
    color: #e2231a;
  }

  .nav_bottom .active .icon {
    color: #e2231a;
  }
</style>
